﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ZXW.DotNet.Common.Basic.Serialize
{
    public interface ISerialize<T,TResult>
    {
        /// <summary>
        /// 序列化对象
        /// </summary>
        /// <param name="data">需要序列化的对象</param>
        /// <returns>序列化到对象</returns>
        TResult Serialize(T data);
        /// <summary>
        /// 反序列化
        /// </summary>
        /// <param name="data">序列化后对象</param>
        /// <returns>对象</returns>
        T DeSerialize(TResult data);
    }
}
